<script setup lang="ts">
import { ref } from "vue";

const isShow = ref(false);
const toggle = (value: boolean, text: string) => {
  isShow.value = !value;
  alert(text);
};
</script>

<template>
  <div class="app-page">
    app
    <div v-show="isShow" class="box"></div>
    <button @click="toggle(isShow, '这是参数')">切换</button>
  </div>
</template>

<style lang="css" scoped>
.box {
  width: 100px;
  height: 100px;
  background-color: aqua;
}
</style>
